package me.shiqiang.im.action;

import me.shiqiang.im.service.UserGroupsService;
import me.shiqiang.im.vo.GroupPropsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by John on 2018/1/12
 */
@RestController
@RequestMapping(value = "/im/groupUsers")
public class UserGroupsAction {

    @Autowired
    private UserGroupsService service;

    @GetMapping("/{userId}")
    public List<GroupPropsVo> getGroupList(Long userId) {
        return service.getGroupList(userId);
    }
}